package com.ruoyi.system.kysh.mapper;

import com.ruoyi.system.kysh.entity.TeamClassInf;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


@Mapper
public interface TeamClassInfMapper {


    Long selectDeptIdByName(@Param("deptName") String deptName,@Param("parentName") String parentName);

    List<Long> selectUserIdByNickName(String nickName);

    List<Long> selectPostIdByPostName(String postName);

    List<Long> selectAllUserId();

    List<Long> selectAllPostId();

    List<TeamClassInf> selectByIdsAndPages(@Param("deptId") Long deptId,@Param("userIds") List<Long> userIds
            ,@Param("postIds") List<Long> postIds,@Param("firstIndex") int firstIndex,@Param("pageSize") int pageSize);

    List<TeamClassInf> selectNewClassInf(@Param("userIds") List<Long> userIds
            ,@Param("firstIndex") int firstIndex,@Param("pageSize") int pageSize);

    List<TeamClassInf> selectByAllPostIds(Long deptId);

    void updateClassInfInDept(@Param("userId") Long userId, @Param("deptId") Long deptId,@Param("updateTime") Date updateTime);

    void deleteByUserAndParentId(@Param("userId") Long userId,@Param("parentId") Long parentId);

    List<Long> selectUserIdByDeptId(Long deptId);

    String selectUserNameIsMor(@Param("userIds") List<Long> userIds);

    void updateClassInf(@Param("userId") Long userId,@Param("postId") Long postId,@Param("deptId") Long deptId,@Param("updateTime") Date updateTime);

    String selectDeptNameByDeptId(Long deptId);

    Long selectParentIdByDeptId(Long deptId);

    String selectUserNameIsAcc(@Param("userIds") List<Long> userIds);

    Long selectDeptIdByUserId(Long userId);

    List<String> selectExUserIdByDeptId(Long deptId);

    void saveUserIdsAndDeptByTask(@Param("taskId") Long taskId,@Param("deptId") Long deptId,@Param("userIds") String userIds);

    String selectUserIdsByTaskId(Long taskId);

    String selectNickNameByUserId(Long id);

    String selectPostNameByUserId(Long id);

    List<TeamClassInf> selectByIdsAndPagesAll(@Param("deptId") Long deptId,@Param("userIds") List<Long> userIds,@Param("postIds") List<Long> postIds);

    List<TeamClassInf> selectNewClassInfAll(@Param("userIds") List<Long> userId);
}
